Fix Payjoin: Add back original PSBT input to payjoin proposal#269
Merged
cryptoquick merged 6 commits intodevelopmentfrom Jul 14, 2023
Merged
Fix Payjoin: Add back original PSBT input to payjoin proposal#269cryptoquick merged 6 commits intodevelopmentfrom
cryptoquick merged 6 commits intodevelopmentfrom
Conversation
Unlike Bitcoin Core's walletprocesspsbt RPC, BKD's finalize_psbt only checks if the script in the PSBT input map matches the descriptor and does not check whether it has control of the OutPoint specified in the unsigned_tx's TxIn. So the original_psbt input data needs to be added back into payjoin_psbt without overwriting receiver input. BIP 78 spec clears script data from payjoin proposal.
Collaborator
|
Thanks for this. As you can see I did 3 things with this PR (separated by commit of course). Is this best practice for this repo or would you prefer separate PRs for distinct features in the future? |
Member
Author
|
You'll see we have our repo configured so that it's all squashed when it's merged, and the PR can be referenced instead: |
DanGould
reviewed
Jul 19, 2023
Comment on lines
+154
to
+155
| proposed_psbtin.witness_utxo = original_psbtin.witness_utxo.clone(); | ||
| proposed_psbtin.non_witness_utxo = original_psbtin.non_witness_utxo.clone(); |
Collaborator
There was a problem hiding this comment.
This is broken because propose_psbtin is cloned, so this does not mutate the original_psbt as it needs to. PR inbound
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #267